home *** CD-ROM | disk | FTP | other *** search
- !
- ! Default civilian script..
- !
- ! (c) DC Software, 1992
- !
- ! Pending Enhancements
- !
- ! - This script has no voices. For an example of voices, look at
- ! MERCHANT.SCR and HEALER.SCR
- !
-
- !------------------------------------------------------------------------!
- :@TALK ! Talk to the character !
- !------------------------------------------------------------------------!
-
- ! First, say hello.. !
- if NPC.V0 > 0 then
- writeln( "Hello ", player.name, ". What brings you back?" );
- else
- writeln( "Hello. I am ", npc.name, ". How may I help you?" );
- endif;
-
- ! Now, set some variables..
- NPC.V0 = 1; ! From know on, remember we've been here
-
- :LOOP
- L3 = getstr("Name","Job","Join","Bye");
- if L3 = -1 then
- writeln( "Ok." );
- STOP;
- endif;
-
- ! First, see if the keyword typed is in the character's text block !
- if dotext( S0 ) then
- if L3 = 3 then
- STOP;
- endif;
- goto LOOP;
- endif;
-
- ! It didn't, so try the predefined ones..
- on L3 goto CNAME, CJOB, CJOIN, CSTOP;
-
- ! Nope, try a 'DEFAULT' line
- if not dotext( "DEFAULT" ) then
- writeln( "I don't know anything about that!" );
- endif;
- goto LOOP;
-
- :CNAME
- writeln( "My name is ", NPC.name, "." );
- GOTO LOOP;
-
- :CJOB
- writeln( "I am a ", npc.type );
- GOTO LOOP;
-
- :CJOIN
- writeln( "I'm too busy. Sorry." );
- GOTO LOOP;
-
- :CSTOP
- writeln( "Nice talking to you.." );
- STOP;
-
- ! Feel free to expand on this list.. !
-